# 导包
import requests

# 设置url,header体,body体,发送http请求,获取响应结果
url = "http://ihrm-test.itheima.net/api/sys/user/1524947438077542400"
header = {"Content-Type": "application/json", "Authorization": "5ac21f38-f08b-42c1-85bd-464258748223"}
body = {"username": "易烊千玺"}

resp = requests.put(url=url, headers=header, json=body)

# 打印响应状态码,响应结果
print("响应状态码=", resp.status_code)
print(resp.json())
